Optimal. Leaf size=178 \[ -\frac {6 a \left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{b^7 d}+\frac {\left (5 a^4+9 a^2 b^2+3 b^4\right ) \tan (c+d x)}{b^6 d}-\frac {a \left (2 a^2+3 b^2\right ) \tan ^2(c+d x)}{b^5 d}+\frac {\left (a^2+b^2\right ) \tan ^3(c+d x)}{b^4 d}-\frac {a \tan ^4(c+d x)}{2 b^3 d}+\frac {\tan ^5(c+d x)}{5 b^2 d}-\frac {\left (a^2+b^2\right )^3}{b^7 d (a+b \tan (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 178, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3587, 711}
\begin {gather*} -\frac {\left (a^2+b^2\right )^3}{b^7 d (a+b \tan (c+d x))}-\frac {6 a \left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{b^7 d}-\frac {a \left (2 a^2+3 b^2\right ) \tan ^2(c+d x)}{b^5 d}+\frac {\left (a^2+b^2\right ) \tan ^3(c+d x)}{b^4 d}+\frac {\left (5 a^4+9 a^2 b^2+3 b^4\right ) \tan (c+d x)}{b^6 d}-\frac {a \tan ^4(c+d x)}{2 b^3 d}+\frac {\tan ^5(c+d x)}{5 b^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 711
Rule 3587
Rubi steps
\begin {align*} \int \frac {\sec ^8(c+d x)}{(a+b \tan (c+d x))^2} \, dx &=\frac {\text {Subst}\left (\int \frac {\left (1+\frac {x^2}{b^2}\right )^3}{(a+x)^2} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {5 a^4+9 a^2 b^2+3 b^4}{b^6}-\frac {2 a \left (2 a^2+3 b^2\right ) x}{b^6}+\frac {3 \left (a^2+b^2\right ) x^2}{b^6}-\frac {2 a x^3}{b^6}+\frac {x^4}{b^6}+\frac {\left (a^2+b^2\right )^3}{b^6 (a+x)^2}-\frac {6 a \left (a^2+b^2\right )^2}{b^6 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=-\frac {6 a \left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{b^7 d}+\frac {\left (5 a^4+9 a^2 b^2+3 b^4\right ) \tan (c+d x)}{b^6 d}-\frac {a \left (2 a^2+3 b^2\right ) \tan ^2(c+d x)}{b^5 d}+\frac {\left (a^2+b^2\right ) \tan ^3(c+d x)}{b^4 d}-\frac {a \tan ^4(c+d x)}{2 b^3 d}+\frac {\tan ^5(c+d x)}{5 b^2 d}-\frac {\left (a^2+b^2\right )^3}{b^7 d (a+b \tan (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(373\) vs. \(2(178)=356\).
time = 1.98, size = 373, normalized size = 2.10 \begin {gather*} \frac {b \sec ^6(c+d x) \left (-70 a^5 b-60 a^3 b^3+50 a b^5-5 a b \left (27 a^4+32 a^2 b^2+b^4\right ) \cos (2 (c+d x))-2 \left (45 a^5 b+70 a^3 b^3+17 a b^5\right ) \cos (4 (c+d x))-25 a^5 b \cos (6 (c+d x))-40 a^3 b^3 \cos (6 (c+d x))-11 a b^5 \cos (6 (c+d x))+120 a^6 \sin (4 (c+d x))+200 a^4 b^2 \sin (4 (c+d x))+76 a^2 b^4 \sin (4 (c+d x))+20 b^6 \sin (4 (c+d x))+30 a^6 \sin (6 (c+d x))+55 a^4 b^2 \sin (6 (c+d x))+26 a^2 b^4 \sin (6 (c+d x))+5 b^6 \sin (6 (c+d x))\right )+10 b \left (30 a^6+47 a^4 b^2+10 a^2 b^4+5 b^6\right ) \sec ^4(c+d x) \tan (c+d x)+960 a^2 \left (a^2+b^2\right )^2 (\log (\cos (c+d x))-\log (a \cos (c+d x)+b \sin (c+d x))) (a+b \tan (c+d x))}{160 a b^7 d (a+b \tan (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.36, size = 201, normalized size = 1.13
method | result | size |
derivativedivides | \(\frac {\frac {\frac {\left (\tan ^{5}\left (d x +c \right )\right ) b^{4}}{5}-\frac {a \,b^{3} \left (\tan ^{4}\left (d x +c \right )\right )}{2}+a^{2} b^{2} \left (\tan ^{3}\left (d x +c \right )\right )+b^{4} \left (\tan ^{3}\left (d x +c \right )\right )-2 a^{3} b \left (\tan ^{2}\left (d x +c \right )\right )-3 a \,b^{3} \left (\tan ^{2}\left (d x +c \right )\right )+5 a^{4} \tan \left (d x +c \right )+9 a^{2} b^{2} \tan \left (d x +c \right )+3 b^{4} \tan \left (d x +c \right )}{b^{6}}-\frac {a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}}{b^{7} \left (a +b \tan \left (d x +c \right )\right )}-\frac {6 a \left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{7}}}{d}\) | \(201\) |
default | \(\frac {\frac {\frac {\left (\tan ^{5}\left (d x +c \right )\right ) b^{4}}{5}-\frac {a \,b^{3} \left (\tan ^{4}\left (d x +c \right )\right )}{2}+a^{2} b^{2} \left (\tan ^{3}\left (d x +c \right )\right )+b^{4} \left (\tan ^{3}\left (d x +c \right )\right )-2 a^{3} b \left (\tan ^{2}\left (d x +c \right )\right )-3 a \,b^{3} \left (\tan ^{2}\left (d x +c \right )\right )+5 a^{4} \tan \left (d x +c \right )+9 a^{2} b^{2} \tan \left (d x +c \right )+3 b^{4} \tan \left (d x +c \right )}{b^{6}}-\frac {a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}}{b^{7} \left (a +b \tan \left (d x +c \right )\right )}-\frac {6 a \left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{7}}}{d}\) | \(201\) |
risch | \(-\frac {4 i \left (15 a^{4} b +25 a^{2} b^{3}+8 b^{5}+90 a^{4} b \,{\mathrm e}^{4 i \left (d x +c \right )}+60 a^{4} b \,{\mathrm e}^{6 i \left (d x +c \right )}+140 a^{2} b^{3} {\mathrm e}^{4 i \left (d x +c \right )}+80 a^{2} b^{3} {\mathrm e}^{6 i \left (d x +c \right )}+100 a^{2} b^{3} {\mathrm e}^{2 i \left (d x +c \right )}+60 a^{4} b \,{\mathrm e}^{2 i \left (d x +c \right )}-15 i a^{5} {\mathrm e}^{10 i \left (d x +c \right )}-75 i a^{5} {\mathrm e}^{8 i \left (d x +c \right )}-150 i a^{5} {\mathrm e}^{6 i \left (d x +c \right )}-150 i a^{5} {\mathrm e}^{4 i \left (d x +c \right )}-75 i a^{5} {\mathrm e}^{2 i \left (d x +c \right )}+15 a^{4} b \,{\mathrm e}^{8 i \left (d x +c \right )}+15 a^{2} b^{3} {\mathrm e}^{8 i \left (d x +c \right )}+32 b^{5} {\mathrm e}^{2 i \left (d x +c \right )}+40 b^{5} {\mathrm e}^{4 i \left (d x +c \right )}-25 i a^{3} b^{2}-8 i a \,b^{4}-15 i a^{5}-30 i a^{3} b^{2} {\mathrm e}^{10 i \left (d x +c \right )}-135 i a^{3} b^{2} {\mathrm e}^{8 i \left (d x +c \right )}-15 i a \,b^{4} {\mathrm e}^{10 i \left (d x +c \right )}-60 i a \,b^{4} {\mathrm e}^{8 i \left (d x +c \right )}-250 i a^{3} b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-80 i a \,b^{4} {\mathrm e}^{6 i \left (d x +c \right )}-240 i a^{3} b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-60 i a \,b^{4} {\mathrm e}^{4 i \left (d x +c \right )}-120 i a^{3} b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-33 i a \,b^{4} {\mathrm e}^{2 i \left (d x +c \right )}\right )}{5 \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5} \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+i a \,{\mathrm e}^{2 i \left (d x +c \right )}-b +i a \right ) b^{6} d}-\frac {6 a^{5} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{b^{7} d}-\frac {12 a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{b^{5} d}-\frac {6 a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{b^{3} d}+\frac {6 a^{5} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b^{7} d}+\frac {12 a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b^{5} d}+\frac {6 a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b^{3} d}\) | \(686\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 186, normalized size = 1.04 \begin {gather*} -\frac {\frac {10 \, {\left (a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}\right )}}{b^{8} \tan \left (d x + c\right ) + a b^{7}} - \frac {2 \, b^{4} \tan \left (d x + c\right )^{5} - 5 \, a b^{3} \tan \left (d x + c\right )^{4} + 10 \, {\left (a^{2} b^{2} + b^{4}\right )} \tan \left (d x + c\right )^{3} - 10 \, {\left (2 \, a^{3} b + 3 \, a b^{3}\right )} \tan \left (d x + c\right )^{2} + 10 \, {\left (5 \, a^{4} + 9 \, a^{2} b^{2} + 3 \, b^{4}\right )} \tan \left (d x + c\right )}{b^{6}} + \frac {60 \, {\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{7}}}{10 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 386 vs.
\(2 (174) = 348\).
time = 0.42, size = 386, normalized size = 2.17 \begin {gather*} -\frac {4 \, {\left (15 \, a^{4} b^{2} + 25 \, a^{2} b^{4} + 8 \, b^{6}\right )} \cos \left (d x + c\right )^{6} - 2 \, b^{6} - 2 \, {\left (15 \, a^{4} b^{2} + 25 \, a^{2} b^{4} + 8 \, b^{6}\right )} \cos \left (d x + c\right )^{4} - {\left (5 \, a^{2} b^{4} + 4 \, b^{6}\right )} \cos \left (d x + c\right )^{2} + 30 \, {\left ({\left (a^{6} + 2 \, a^{4} b^{2} + a^{2} b^{4}\right )} \cos \left (d x + c\right )^{6} + {\left (a^{5} b + 2 \, a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )^{5} \sin \left (d x + c\right )\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - 30 \, {\left ({\left (a^{6} + 2 \, a^{4} b^{2} + a^{2} b^{4}\right )} \cos \left (d x + c\right )^{6} + {\left (a^{5} b + 2 \, a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )^{5} \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2}\right ) + {\left (3 \, a b^{5} \cos \left (d x + c\right ) - 4 \, {\left (15 \, a^{5} b + 25 \, a^{3} b^{3} + 8 \, a b^{5}\right )} \cos \left (d x + c\right )^{5} + 2 \, {\left (5 \, a^{3} b^{3} + 7 \, a b^{5}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{10 \, {\left (a b^{7} d \cos \left (d x + c\right )^{6} + b^{8} d \cos \left (d x + c\right )^{5} \sin \left (d x + c\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec ^{8}{\left (c + d x \right )}}{\left (a + b \tan {\left (c + d x \right )}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.58, size = 253, normalized size = 1.42 \begin {gather*} -\frac {\frac {60 \, {\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{7}} - \frac {10 \, {\left (6 \, a^{5} b \tan \left (d x + c\right ) + 12 \, a^{3} b^{3} \tan \left (d x + c\right ) + 6 \, a b^{5} \tan \left (d x + c\right ) + 5 \, a^{6} + 9 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )}}{{\left (b \tan \left (d x + c\right ) + a\right )} b^{7}} - \frac {2 \, b^{8} \tan \left (d x + c\right )^{5} - 5 \, a b^{7} \tan \left (d x + c\right )^{4} + 10 \, a^{2} b^{6} \tan \left (d x + c\right )^{3} + 10 \, b^{8} \tan \left (d x + c\right )^{3} - 20 \, a^{3} b^{5} \tan \left (d x + c\right )^{2} - 30 \, a b^{7} \tan \left (d x + c\right )^{2} + 50 \, a^{4} b^{4} \tan \left (d x + c\right ) + 90 \, a^{2} b^{6} \tan \left (d x + c\right ) + 30 \, b^{8} \tan \left (d x + c\right )}{b^{10}}}{10 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.63, size = 258, normalized size = 1.45 \begin {gather*} \frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (\frac {a^3}{b^5}-\frac {a\,\left (\frac {3}{b^2}+\frac {3\,a^2}{b^4}\right )}{b}\right )}{d}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^5}{5\,b^2\,d}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (\frac {1}{b^2}+\frac {a^2}{b^4}\right )}{d}-\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (\frac {a^2\,\left (\frac {3}{b^2}+\frac {3\,a^2}{b^4}\right )}{b^2}-\frac {3}{b^2}+\frac {2\,a\,\left (\frac {2\,a^3}{b^5}-\frac {2\,a\,\left (\frac {3}{b^2}+\frac {3\,a^2}{b^4}\right )}{b}\right )}{b}\right )}{d}-\frac {a\,{\mathrm {tan}\left (c+d\,x\right )}^4}{2\,b^3\,d}-\frac {\ln \left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )\,\left (6\,a^5+12\,a^3\,b^2+6\,a\,b^4\right )}{b^7\,d}-\frac {a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6}{b\,d\,\left (\mathrm {tan}\left (c+d\,x\right )\,b^7+a\,b^6\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________